package IHM;

import java.awt.*;

import javax.swing.*;



public class CadreBas extends JPanel implements DimensionIHM {

	
	public JRadioButton TestCPU,TestMemory,TestHardDisk,TestProgramme,SelectAll;

	public JButton valider;
	
	
/*	
	public CadreBas() {
	
		TestCPU = new JRadioButton("TestCPU");
		
		TestMemory = new JRadioButton("TestMemory");
		
		TestHardDisk = new JRadioButton("TestHardDisk");
		
		TestProgramme = new JRadioButton("TestProgramme");
		
		SelectAll = new JRadioButton("SelectAllMachine");
		
		valider = new JButton("Valider");
		
		setLayout(null);
		
		
		setPreferredSize(new Dimension(LARGEUR_CADRE_DROIT,HAUTEUR_CADRE_DROIT));
		
		TestCPU.setBounds(ABSCISSE_PREMIER_BOUTON_TEST,ORDONNEE_PREMIER_BOUTON_TEST,100,50);
		
		TestMemory.setBounds(ABSCISSE_PREMIER_BOUTON_TEST,ORDONNEE_PREMIER_BOUTON_TEST+GAP_VERTICAL_TEST,100,50);
		
		TestHardDisk.setBounds(ABSCISSE_PREMIER_BOUTON_TEST,ORDONNEE_PREMIER_BOUTON_TEST+2*GAP_VERTICAL_TEST,100,50);
		
		TestProgramme.setBounds(ABSCISSE_PREMIER_BOUTON_TEST+GAP_HORIZONTAL_TEST,ORDONNEE_PREMIER_BOUTON_TEST,100,50);
		
		SelectAll.setBounds(ABSCISSE_PREMIER_BOUTON_TEST+GAP_HORIZONTAL_TEST,ORDONNEE_PREMIER_BOUTON_TEST+GAP_VERTICAL_TEST,100,50);
		
		valider.setBounds(ABSCISSE_PREMIER_BOUTON_TEST+2*GAP_HORIZONTAL_TEST,ORDONNEE_PREMIER_BOUTON_TEST+GAP_VERTICAL_TEST,80,50);
		
		
		add(TestCPU);
			
		add(TestMemory);
		
		add(TestHardDisk);
		
		add(TestProgramme);
		
		add(SelectAll);
		
		add(valider);
				
	}
	
*/	
	
	
	public void init() {
		
		TestCPU = new JRadioButton("TestCPU");
		
		TestMemory = new JRadioButton("TestMemory");
		
		TestHardDisk = new JRadioButton("TestHardDisk");
		
		TestProgramme = new JRadioButton("TestProgramme");
		
		SelectAll = new JRadioButton("SelectAllMachine");
		
		valider = new JButton("Valider");
		
		JPanel cotegauche = new JPanel();
		
		JPanel cotedroit = new JPanel();
		
		GridLayout disposition1 = new GridLayout(4,1);
		
		GridLayout disposition2 = new GridLayout(2,1);
		
		BorderLayout disposition3 = new BorderLayout();
		
		cotegauche.setLayout(disposition1);
		
		cotedroit.setLayout(disposition2);
		
		this.setLayout(disposition3);
		
		cotegauche.add(TestCPU);
		
		cotegauche.add(TestMemory);
		
		cotegauche.add(TestHardDisk);
		
		cotegauche.add(TestProgramme);
		
		cotegauche.setPreferredSize(new Dimension(LARGEUR_CADRE_CENTRAL/3,HAUTEUR_CADRE_CENTRAL/3));
		
		
		cotedroit.setPreferredSize(new Dimension(LARGEUR_CADRE_CENTRAL/3,HAUTEUR_CADRE_CENTRAL/3));
		
		cotedroit.add(SelectAll);
		
		cotedroit.add(valider);
		
		this.add("EAST",cotedroit);
		
		this.add("WEST",cotegauche);
		
		
		
		
				
	}
	
	public void paintComponent(Graphics g){
    	
		super.paintComponent(g);
	}
	
	public static void main(String args[]){
	
		CadreBas cadrebas = new CadreBas();
		
		JFrame fenetre=new JFrame("test");
		
		fenetre.setPreferredSize(new Dimension(2*LARGEUR_CADRE_CENTRAL/3,HAUTEUR_CADRE_CENTRAL/3));

		fenetre.add(cadrebas);
		
		fenetre.pack();
		
		fenetre.setVisible(true);
		
		
	}
	
	
	
}
